
/* This module defines the syscall codes and the mapping between them and the kernel's function */

#ifndef SYSCALL_H
#define SYSCALL_H

#include "process_management.h"
#include "display.h"
#include "message_passing.h"
#include "process_supervision.h"
#include "dynamic_memory.h"
#include "timer.h"

#define FOURCHETTE                      1
#define TUER                            2
#define QUITTER                         3

#define OBTENIR_PROGRAMME               4
#define OBTENIR_PID                     5
#define OBTENIR_PRIORITE                6
#define OBTENIR_PARENT                  30
#define OBTENIR_TOUS_PID                7
#define OBTENIR_ETAT                    22
#define CHANGER_PRIORITE                19

#define ECRIRE                          8
#define ECRIRE_LCD                      9
#define LIRE                            11

#define BLOQUER                         12
#define REVEILLER                       20
#define RETARDER                        13
#define ATTENDRE                        21

#define ALLOUER                         14
#define LIBERER                         15

#define ENVOYER_CHAINE                  16
#define ENVOYER_ENTIER			25
#define ENVOYER_INFORMATIONS_PROCESSUS  32
#define RECEVOIR_PREMIER                17
#define RECEVOIR_DE                     23
#define RECEVOIR_PRIORITE               24
#define RECEVOIR_PREMIER_DELAI          26
#define RECEVOIR_DE_DELAI               27
#define RECEVOIR_PRIORITE_DELAI         28
#define OBTENIR_NOMBRE_MESSAGES         29
#define LIBERER_MESSAGE                 33

#define SUPERVISER                      18
#define STOPPER_SUPERVISION             31

#define OBTENIR_PROGRAMME_PAR_ID        10
#define OBTENIR_PROGRAMME_AIDE          34 

/* global variables */

/* we need to save the caller to be able to give it the return code */
PCB* caller;

/* function definitions */
void dispatch_syscall();

#endif
